/**
 * @type {Number}
 *
 * @properties={typeid:35,uuid:"3C53FBDE-1999-4590-A3B2-771E0E20BF52",variableType:4}
 */
var fImp = 0;

/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"B9B8F66C-A658-4C42-83F5-3323D1D299C1"}
 */
function onShow_Print(firstShow, event) {
	if (fImp == 0)
	{
		controller.sort("ubicacion asc, anio_alta asc, mes_alta asc")	
		controller.showPrintPreview()
		fImp = 1
	}
	else
	{
		fImp = 0
		var $win = application.getWindow("BIENES")
		$win.hide()
		$win.destroy()
	}
}
